package com.aerozhonghuan.logisticsmall.modules.sort.logic;

import android.content.Context;

import com.aerozhonghuan.logisticsmall.framework.base.URLs;
import com.aerozhonghuan.logisticsmall.modules.sort.beans.TreeBean;
import com.aerozhonghuan.logisticsmall.widget.ProgressDialogIndicator;
import com.aerozhonghuan.oknet2.CommonCallback;
import com.aerozhonghuan.oknet2.RequestBuilder;
import com.google.gson.reflect.TypeToken;

/**
 * Created by ChenLin on 2019/5/22 16:13.Email&WeChat:7877409@163.com
 */
public class SortInfoRequest {

    public static void tree(Context context, ProgressDialogIndicator dialog, CommonCallback<TreeBean> callback) {
        TypeToken<TreeBean> type = new TypeToken<TreeBean>() {
        };
        callback.setResponseType(type);
        RequestBuilder.with(context)
                .URL(URLs.TREE)
                .progress(dialog)
                .onSuccess(callback).excute();
    }
}
